// components/shop-item/index.js
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        _id: {
            type: String,
            observer: function (newVal, oldVal, changePath) {
                this.setData({
                    _id: newVal
                })
            }
        },
        _openid: {
            type: String,
        },
        info: {
            type: String
        },
        title: {
            type: String,
        },
        value: {
            type: Number,
        },
        img_url: {
            type: Array,
        },
    },

    /**
     * 组件的初始数据
     */
    data: {
        _id: "",
    },

    /**
     * 组件的方法列表
     */
    methods: {
        toShopInfo(event) {
            console.log(event)
            let url = `/pages/shopInfo/index?_id=${this.data._id}`
            wx.navigateTo({
                url: url,
            })
        }
    }
})